Get Subscriber Campaigns

Get Subscriber Campaigns API is used to retrieve floSIM campaigns for the subscriber..

The customer is not allowed to top-up a plan of the RATE type.

HTTP URL

 

GET

api/v2/subscriber/{type}/{value}/campaign/{id}

NOTE: If campaign {id} is not provided, retrieve all campaigns for the subscriber. All {type} and {value} pairs, define the search criteria. Valid {type} ENUMs are: ‘imsi’, ‘iccid’, ‘msisdn’, ‘imei’.

Eligibility

The Requestor is eligible to request for campaign information of his own subscribers regardless their actual existence (which level they reside in).

API Request

Not applicable

API Response

Response Structure

Parameter Type M/O/CM Description
Parameter Type M/O/CM Description
errorCode String O Failure code. See list below, under ‘Error Codes’ section
errorMessage String O Failure detailed description. See list below, under ‘Error Codes’ section
content Object O Array of main response body object. Displayed when an API call was successful. For a failure it will be empty.
pageable Object O Paging information object. Displayed when an API call was successful. For a failure it will be empty.

Content

Parameter Type M/O/CM Description
id Numeric M CMP campaign participant identity
campaignId Numeric M Identity of the campaign
status String M Campaign participant message status. ENUM Valid values: PENDING, COMPLETED, SUSPENDED, PROGRESS, WAIT, RETRY, CANCELED, CANCELING, EXCEPTION Note: This is NOT the campaign status.
attempts Numeric M Number of attempts made to run the campaign instance on the subscriber
timestamp dateTime M Date and time of campaign instance last update (including creation and updates)

Pageable

Parameter Type M/O/CM Description
page Numeric M Page number
size Numeric M Page size. Number of requested elements per page
totalPages Numeric M Total amount of available pages per requested page size
totalElements Numeric M Total amount of retrieved elements

Error Codes

In addition to the general success and failure codes, the following error codes are possible.

Code Message
GLOBAL_1001 Service unavailable. Please try again

Examples

Request Body

Copy
{
}

Response Body: Full Success (ACK)

Copy
{
  "errorCode": "",
  "errorMessage": "",
  "content": [
    {
          "id": "2047016",
          "campaignId": "527",
          "status": "PENDING",
          "attempts": "3",
          "timestamp": "2022-02-11 14:21:53"
        },
        {
          "id": "2028328",
          "campaignId": "528",
          "status": "COMPLETED",
          "attempts": "5",
          "timestamp": "2022-03-12 19:28:59"
        }
  ],
  "pageable": {
    "page": 0,
    "size": 10,
    "totalPages": 1,
    "totalElements": 1
  }
}

Response Body: Includes Failure(s) NAK

Copy
{
  "errorCode": "GLOBAL_1001",
  "errorMessage": "Service unavailable. Please try again",
  "content": "",
  "pageable": ""
}